<?php
/* @var $this ImageController */
/* @var $tag ImageTag */
/* @var $form CActiveForm  */
?>

<h1>Add Tags</h1>

<div class="form">
<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'imageTag-form',
    'enableClientValidation' => true,
    'clientOptions' => array(
        'validateOnSubmit' => true,
    ),
    'htmlOptions' => array(
        'enctype' => 'multipart/form-data',
    ),
        ));
?>

    <p class="note">Fields with <span class="required">*</span> are required.</p>

    <div class="row">
        <?php echo $form->labelEx($tag, 'position'); ?>
        <?php echo $form->textField($tag, 'position'); ?>
        <?php echo $form->error($tag, 'position'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($tag, 'brand'); ?>
        <?php echo $form->textField($tag, 'brand'); ?>
        <?php echo $form->error($tag, 'brand'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($tag, 'item_id'); ?>
        <?php echo $form->dropDownList($tag, 'item_id',CHtml::listData(Item::model()->findAll(),'id','name')); ?>
        <?php echo $form->error($tag, 'item_id'); ?>
    </div>



    <div class="row buttons">
<?php echo CHtml::submitButton('Add Tag'); ?>
    </div>

<?php $this->endWidget(); ?>
</div><!-- form -->
